package com.meituan.sdk.model.ddzhkh.merchantreceipt.merchantreceiptDirectRefund;

import com.meituan.sdk.annotations.ApiMeta;
import com.google.gson.reflect.TypeToken;
import javax.validation.constraints.NotBlank;
import java.lang.reflect.Type;
import com.meituan.sdk.internal.utils.JsonUtil;
import com.google.gson.annotations.SerializedName;
import javax.validation.constraints.NotNull;
import com.meituan.sdk.MeituanResponse;
import com.meituan.sdk.MeituanRequest;

/**
* 商家券已消费券码商家退款（商家发起）
* This file was automatically generated.
*/
@ApiMeta(
    path = "/ddzhkh/merchantreceipt/direct/refund",
    businessId = 59,
    apiVersion = "10014",
    apiName = "merchantreceipt_direct_refund",
    needAuth = true
)
public class MerchantreceiptDirectRefundRequest implements MeituanRequest<MerchantreceiptDirectRefundResponse> {
    /**
    * <p data-diff-id="ct-diff-id-9345b5e4-95e1-443d-bd9c-161ae12629d1">订单号</p>
    */
    @NotBlank(message = "orderId不能为空")
    @SerializedName("orderId")
    private String orderId;
    /**
    * <p data-diff-id="ct-diff-id-ad7eea8f-6f32-4f18-b36e-3fe4502589c0">待退款券码,一次仅支持退单张券</p>
    */
    @NotBlank(message = "serialNumber不能为空")
    @SerializedName("serialNumber")
    private String serialNumber;
    /**
    * <p data-diff-id="ct-diff-id-b9028e62-08f9-4aee-844e-ebd95f98ca02">操作人ID（三方系统自定义字段，主要为留痕使用）</p>
    */
    @NotBlank(message = "operatorId不能为空")
    @SerializedName("operatorId")
    private String operatorId;
    /**
    * <p data-diff-id="ct-diff-id-654c91be-a924-4e33-b0e5-828bf1d222b7">是否需要审核（true:  需要审核  ，false ：不需要审核）</p>
    */
    @NotNull(message = "needAudit不能为空")
    @SerializedName("needAudit")
    private Boolean needAudit;
    /**
    * <p data-diff-id="ct-diff-id-1edf3452-b64b-4748-971f-bd3ad7ff7f96">门店ID（核销门店ID）</p>
    */
    @NotBlank(message = "opPoiId不能为空")
    @SerializedName("opPoiId")
    private String opPoiId;
    /**
    * <p data-diff-id="ct-diff-id-812ca7fc-1a4f-4300-af4d-63e6aaf5d2e9">流水号（用于做幂等处理，时效为10min）</p>
    */
    @NotBlank(message = "sequenceId不能为空")
    @SerializedName("sequenceId")
    private String sequenceId;

    public String getOrderId() {
        return orderId;
    }
    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }
    public String getSerialNumber() {
        return serialNumber;
    }
    public void setSerialNumber(String serialNumber) {
        this.serialNumber = serialNumber;
    }
    public String getOperatorId() {
        return operatorId;
    }
    public void setOperatorId(String operatorId) {
        this.operatorId = operatorId;
    }
    public Boolean getNeedAudit() {
        return needAudit;
    }
    public void setNeedAudit(Boolean needAudit) {
        this.needAudit = needAudit;
    }
    public String getOpPoiId() {
        return opPoiId;
    }
    public void setOpPoiId(String opPoiId) {
        this.opPoiId = opPoiId;
    }
    public String getSequenceId() {
        return sequenceId;
    }
    public void setSequenceId(String sequenceId) {
        this.sequenceId = sequenceId;
    }


    @Override
    public MeituanResponse<MerchantreceiptDirectRefundResponse> deserializeResponse(String response) {
        Type type = new TypeToken<MeituanResponse<MerchantreceiptDirectRefundResponse>>(){}.getType();
        return JsonUtil.fromJson(response, type);
    }
    @Override
    public String serializeToJson() {
        return JsonUtil.toJson(this);
    }


    @Override
    public String toString() {
        return "MerchantreceiptDirectRefundRequest{" + "orderId=" + orderId + "," + "serialNumber=" + serialNumber + "," + "operatorId=" + operatorId + "," + "needAudit=" + needAudit + "," + "opPoiId=" + opPoiId + "," + "sequenceId=" + sequenceId + "}";
    }
}
